<template>
  <q-scroll-area :visible="false" class="menu-cls bg-white">
    <MenuItem :init-level="0" :menu="menus" :open-menu="openMenu"></MenuItem>
  </q-scroll-area>
</template>

<script setup>
import MenuItem from 'pages/Menu/MenuItem.vue'
import { userStores } from 'stores/user-stores'
import { computed } from 'vue'
import { useRoute } from 'vue-router'

const route = useRoute()
const userStore = userStores()
const menus = computed(() => userStore.treeMenus)
const openMenu = computed(() => (route.meta || {}).parentIds || '')
</script>